package com.gougou.rpc.custom;

/**
 * Created by EX-ZHANZHENQIANG001 on 2018-05-02.
 */
public class RpcResponse {


    /**
     * 请求ID
     */
    private String requestId;

    /**
     * 异常信息
     */
    private Throwable error;

    /**
     * 返回对象
     */
    private Object result;

    /**
     * 判断是否异常
     * @return
     */
    public boolean isError() {
        return error != null;
    }

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public Throwable getError() {
        return error;
    }

    public void setError(Throwable error) {
        this.error = error;
    }

    public Object getResult() {
        return result;
    }

    public void setResult(Object result) {
        this.result = result;
    }
}
